deploying office by running setup.exe \adminfile file.msp

Hi all, just got some Office 2010 licences so I'm looking to automatically deploy these however im strugaling.

 

Ive made a custom msp file that works fine if you run : Path\setup.exe /adminfile file.msp

however I tried to put this into out vbScript logon script which wouldnt work I also tried It in a batch script again it wont work. basically this is the code I put into my VBs Script:

 

'---------------------------------------------------------
'
'OFFICE 2010 install
'
'---------------------------------------------------------

If IsMember("Office 2010 Group") Then
        If NOT objFSO.FileExists("C:\Program files\Microsoft Office\Office14\winword.exe") Then
start "\\server\path\Office 2010 deployment\32\setup.exe /adminfile \test.msp"

        End If
End If

I've tried about a billion variants with "", .\updates, etc etc. which brought me to my Batch script :

 

start "\\server\path\Office 2010 deployment\32\setup.exe /adminfile \test.msp"

 

this will load a command prompt in that folder, but not actually do anything, I've also tried run instead of start and no joy!

I have literally no scripting skills but really want this sorted so any help would be great

 

July 13th, 2011 2:03pm

if you place your customisation file test.msp into the \updates folder, and just call setup.exe, that will work.

so if your fileset looks like this:

\\servername\share\off2010
\\servername\share\off2010\setup.exe
\\servername\share\off2010\updates
\\servername\share\off2010\updates\test.msp
etc

then all you need to do is run setup.exe, and the setup controller will know to look in the \updates folder for test.msp
if you are placing other msp files in the updates folder (maybe the SP1 msp files), then ensure there is only one customisation MSP, and you should name it something like 1_test.msp, the number will help the setup controller find the customisation msp quickly/e

Free Windows Admin Tool Kit Click here and download it now
July 13th, 2011 2:14pm

Hi Don,

so just :

'---------------------------------------------------------
'
'OFFICE 2010 install
'
'---------------------------------------------------------

If IsMember("Office 2010 Group") Then
        If NOT objFSO.FileExists("C:\Program files\Microsoft Office\Office14\winword.exe") Then
start "\\server\path\Office 2010 deployment\32\setup.exe"

        End If
End If

 

because I tried that before and it didnt work :(

July 13th, 2011 2:20pm

Bump
Free Windows Admin Tool Kit Click here and download it now
July 13th, 2011 7:24pm

first, confirm that your office customisation and setup files are all valid.
logon to a pc and launch your proposed command line - does office install?

then, uninstall office. now launch your script file. does office install?
once you have confirmed your fileset is valid, and script is ok, you can focus on the trickier part.

are you launching this as machine startup script, or user logon script?
(i think you will have to use a user logon script for installation of office)
can all users access the share you have setup? do all users have enough permissions on their pc to install office?

so on the machine where you are testing this, does setup.exe get launched (check in %TEMP% for an officesetup logfile)?
if you have task manager running, setup.exe should appear, and also other setup-related processes/threads should appear too.
if you can't see this happening, but can see a brief console window appear, that's probably the cscript popping up and then closing due to a bad argument.

tell us a little more about how you are launching the script.
and if the setup package is installing ok, maybe you just need to focus on your script content and script launch method.

July 14th, 2011 12:19am

yea the setup package lauches fine if i open a cmd prompt and run UNC\setup.exe /adminfile test.msp it works fien (how i installed it on my desktop as a test)

it seems for whatever reasonmy script wont work, even just launching the setup with those variables wont work. (as appose to how I want it to work in my script where it checks for office 14 prior to that) if someone could give me an exact script of how to run an exe with command switches in VBS or as a bat file I would be so greatful, if not im going to have to do this all manually and its going to murder me!!!!

Free Windows Admin Tool Kit Click here and download it now
July 14th, 2011 5:03pm

if you can answer the questions I asked above then that will help understand the environment you are using.

otherwise I'll keep guessing :)

so, your setup package works ok when you fire it off interactively without your script?
your scripting questions are best directed to the scripting guys forum rather than here, as your glitch is outside the office setup.
at a glance, your VBScript is calling "IsMember", but it doesn't look like you are specifying the context of that call, so check if you need to be prefixing that with the computername where you are looking for the group? or the domain name? or maybe it needs to be a slightly more complicated LDAP or ADSI call, if that group is a domain global group?

or you could simplify the whole thing by not doing a membership test, and assign your script in another way (such as a GPO logon script) that way, the group membership is evaluated outside of your script, which simplifies the script.

or, get a real software deployment system :)

July 15th, 2011 12:12am

If you put the .msp file in the "Updates" folder within the Microsoft package, the .msp file will automatically install. Then you can take the "/adminfile file.msp" out of the command line.

For example:

cmdline = "setup.exe /config prjpro.WW\config.xml"

I've also used a config.xml file to suppress reboot and accept the EULA during installation etc.

  • Proposed as answer by Breanna K 5 hours 24 minutes ago
Free Windows Admin Tool Kit Click here and download it now
February 9th, 2015 1:30am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics